<!--
 * @Author: 朱自强
 * @Date: 2024-03-08 08:53:11
 * @LastEditors: 朱自强
 * @LastEditTime: 2024-03-12 14:09:28
 * @FilePath: \A-LOT-OF-TEST-VUE3\index.html
 * @Description: 
 * 
 * Copyright (c) 2024 by 朱自强, All Rights Reserved. 
-->
<!doctype html>
<html lang="zh-cn">
  <head>
    <meta charset="UTF-8" />
    <!-- <link rel="icon" href="/favicon.ico" /> -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <!-- <title>Vite App</title> -->
  </head>
  <script>
    const xhr = new XMLHttpRequest()
    let config = {}
    xhr.open('GET', '/config.json')
    xhr.send()
    xhr.onload = function () {
      if (xhr.status === 200) {
        config = JSON.parse(xhr.response)
        // console.log("config", config, document.title);
        const link = document.createElement('link')
        link.setAttribute('rel', 'stylesheet')
        link.setAttribute('href', '/' + config.appIcon)
        document.getElementsByTagName('head')[0].appendChild(link)
        document.title = config.appTitle
      }
    }
  </script>
  <body>
    <div id="app"></div>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>
